package com.frank.oj.service.oj;

import com.frank.model.entity.discussion.Comment;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.ReplyDTO;
import com.frank.oj.model.vo.CommentListVO;
import com.frank.oj.model.vo.CommentVO;
import com.frank.oj.model.vo.ReplyVO;

import java.util.List;

/**
 * @author frank
 * @Date 2024/4/15
 */
public interface CommentService {
    CommonResult<CommentListVO> getComments(Long cid, Integer did, Integer limit, Integer currentPage);

    CommonResult<CommentVO> addComment(Comment comment);

    CommonResult<Void> deleteComment(Comment comment);

    CommonResult<Void> addCommentLike(Integer cid, Boolean toLike, Integer sourceId, String sourceType);

    CommonResult<List<ReplyVO>> getAllReply(Integer commentId, Long cid);

    CommonResult<ReplyVO> addReply(ReplyDTO replyDto);

    CommonResult<Void> deleteReply(ReplyDTO replyDto);
}
